package org.nlp2rdf.navigator.benchmark;

import java.util.AbstractSet;
import java.util.Iterator;

/**
 * Created by Claus Stadler
 * Date: Oct 28, 2010
 * Time: 1:42:53 AM
 *
 * A set which has a size, but no concrete elements.
 * (Intended to be used with SampleStats in case the sets of negatives is very large:
 * In this case trying to access negative items yields an exception, however
 * the count of these items can be retrieved)
 *
 */
public class PseudoSet<T>
    extends AbstractSet<T>
{
    private int size;

    public PseudoSet(int size)
    {
        this.size = size;
    }

    @Override
    public Iterator<T> iterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public int size() {
        return size;
    }
}
